import { User } from '@prisma/client'
import { Exclude } from 'class-transformer'

export class CommontEntity {
   id: number
   content: string
   createDate: Date
   UpdataAt: Date
   articelId: number
   commontId?: number
   userId: number
   replyUserId?: number
   user: User
   replys?: {
      id: number
      content: string
      createDate: Date
      UpdataAt: Date
      articelId: number
      commontId?: number
      userId: number
      replyUserId?: number
      user: User
      replyUser: User
   }[]

   constructor(partial: Partial<CommontEntity>) {
      Object.assign(this, partial)
   }
}
